Import client.tsp from main.tsp for deploymentStacks, policy, and search (@scope support)#44027
Merged
timotheeguerin merged 6 commits intoJun 17, 2026
Conversation
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
iscai-msft
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress for Azure/typespec-azure#4564
Summary
Makes
main.tspimport./client.tspfor deploymentStacks, policy, and search, now that the autorest emitter honors the@scopeTCGC decorator (Azure/typespec-azure#4565, shipped in@azure-tools/typespec-autorest@0.69.1, upgraded in #44014).These services'
client.tspdeclare language-restructured operations via@@scope(...). Previously the autorest emitter ignored@scopeand emitted all of them, somain.tspcould not importclient.tspwithout injecting phantom operations into the swagger (~1300 lines for deploymentStacks, ~840 for policy). With@scopenow honored, the scoped-out operations are correctly omitted.search
searchneeded a few extra customizations to reach byte-identical output:@@scope(..., "!autorest")to the 24 client-only customization operations so the autorest emitter no longer emits them (some hadbody: void, which previously caused emit failures).SearchResourceEncryptionKey@@clientNamerenames (keyName/keyVersion/vaultUri) to"!autorest"so they don't leakx-ms-client-nameinto the swagger.search-management-request-options,AccessRulePropertiesSubscriptionsItem,SearchServiceNetworkSecurityPerimeterInboundRuleSubscription) into a dedicated top-levelSearchClientCustomizationsnamespace (newclient-customizations.tsp). The autorest emitter enumerates all named models in the service namespace whenomit-unreachable-typesis off; relocating these client-only types keeps them out of the swagger while preserving their names for SDK generation.Verification
For all three services, regenerating with the autorest emitter produces swagger byte-identical to what is checked in, across all API versions, and compiles cleanly under
--warn-as-error. Only.tspfiles change; no generated swagger changes.Related
Part of the effort to make
main.tspthe single TypeSpec compilation entry point. Companion PR #44009 covers services that work withomit-unreachable-types.